How to structure a function to add a key-value pair to a javascript object

join shbcf.ru